package com.xunge.mapper;

import com.xunge.pojo.Student;
import com.xunge.pojo.StudentQueryParam;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface StudentMapper {

    List<Student> page(StudentQueryParam studentQueryParam);

    void insert(Student student);

    Student getById(Integer id);

    void update(Student student);

    void deleteById(List<Integer> ids);

    void updateViolation(Integer id, Integer score, Integer count);

    @MapKey("name")
    List<Map<String, Object>> countDegreeData();

    @MapKey("clazzName")
    List<Map<String, Object>> countStudentData();

    @MapKey("name")
    List<Map<String, Object>> countStudentGenderData();
}
